from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.contrib.auth.forms import AuthenticationForm
from django.views.generic.simple import direct_to_template
from django.conf import settings
from blog.settings import MEDIA_ROOT

admin.autodiscover()

urlpatterns = patterns('',
    # Example:
#	(r'^blog/$', 'blog.myblog.views.index'),
#	(r'^account/loggedin', 'blog.myblog.views.user_logged_in'),
#	(r'^$', 'blog.myblog.views.index'),
#	(r'^blog/create$', 'blog.myblog.views.create_user_form'),
	(r'^view_dests/$', 'blog.myblog.views.view_dests'),
	(r'^view_dests/dests_xml$', 'blog.myblog.views.serve_dest_xml'),
	(r'^view_dest_routes/(.*)/(.*)/$', 'blog.myblog.views.view_dest_routes'),
	(r'^view_dests/dest_routes_xml/(.*)/(.*)/$', 'blog.myblog.views.serve_dest_routes_xml'),
	(r'^add_dest/$', 'blog.myblog.views.add_dest'),
	(r'^add_route/$', 'blog.myblog.views.add_route'),
	(r'^view_dests/submit_route/$', 'blog.myblog.views.submit_route'),

#	(r'^accounts/', include('registration.backends.default.urls')),
#	(r'^$', direct_to_template,
 #           { 'template': 'index.html' }, 'index'),

	

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
	(r'^admin/', include(admin.site.urls)),
#	(r'^photologue/', include('photologue.urls')),
)

if settings.DEBUG:
        urlpatterns += patterns('',
			(r'^.*media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}),
			)
